﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Qu.SeniorProject.Model.Repository
{
    public class StudentRepo : IRepo<Student>
    {
        public int Insert(Student o)
        {
            throw new NotImplementedException();
        }

        public void Delete(int id)
        {
            throw new NotImplementedException();
        }

        public void Update(Student o)
        {
            throw new NotImplementedException();
        }

        public Student Get(string id)
        {
            var spDB = new SeniorProjectEntities();

            return spDB.Students.Where(s => s.StudentId == id).FirstOrDefault();
        }

        public IEnumerable<Student> GetAll()
        {
            var spDB = new SeniorProjectEntities();

            return spDB.Students;
        }

        public int Count()
        {
            var spDB = new SeniorProjectEntities();

            return spDB.Students.Count();
        }

        public IEnumerable<Student> GetPage(int page, int pageSize)
        {
            throw new NotImplementedException();
        }

        //public Omu.Awesome.Core.IPageable<Student> GetPageable(int page, int pageSize)
        //{
        //    throw new NotImplementedException();
        //}
    }
}
